The present disclosure relates to computer software, and more specifically, to computer software which uses ontologies to comprehend regular expressions. A regular expression (regex) is an expression that specifies a set of rules for identifying strings that satisfy the expression. One challenge for computer users is how to understand what kind of pattern a regex is meant to identify. Also, users may wish to tweak an existing regex to determine why certain expected strings are being matched or are not being matched against a regex. Regular expressions, however, are typically hard-coded or pre-exist in tools in a format not readily understandable to humans. As such, to transform a regex to a more human-readable form, the user must first determine what the regex means. While computers can easily process regular expressions, they are typically difficult for humans to understand.